package com.xw.pojo;

import lombok.Data;


public class Result {
      private String code;
      private String mesg;

      private  Object data;

      private String jwttoken;

      public  Result(){

      }

      public  static  Result ok(){

          Result result = new Result();
          result.setCode("200");
          result.setMesg("请求成功!");
          return result;
      }

      public  static  Result error(){
          Result result = new Result();
          result.setCode("400");
          result.setMesg("未访问数据");
          return  result;
      }

    public  static  Result unfind(){
        Result result = new Result();
        result.setCode("404");
        result.setMesg("未找到用户数据");
        return  result;
    }


    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMesg() {
        return mesg;
    }

    public void setMesg(String mesg) {
        this.mesg = mesg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getJwttoken() {
        return jwttoken;
    }

    public void setJwttoken(String jwttoken) {
        this.jwttoken = jwttoken;
    }
}
